//
//  BGQueryViewController.m
//  bingke
//
//  Created by zhangkt zhangkt on 12-10-17.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "BGQueryViewController.h"

@implementation BGQueryViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) 
    {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    menuView = [[BGMenuView alloc] init];
    headView = [[BGHeadView alloc] init];
    
    NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"BGMenuView" owner:self options:nil];
    menuView = [array objectAtIndex:0];
    menuView.frame = [BGMenuView getFrame];
    [self.view addSubview:menuView];
    menuView.backgroundColor = [UIColor clearColor];
    
    NSArray *headViewArray = [[NSBundle mainBundle] loadNibNamed:@"BGHeadView" owner:self options:nil];
    headView = [headViewArray objectAtIndex:0];
    headView.frame = CGRectMake(0, 0, 320, 83);
    [self.view addSubview:headView];
    headView.backgroundColor = [UIColor clearColor];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
